package com.novasoftware.novagooglemap.wibget.gmap;
import android.graphics.drawable.Drawable;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;

public class GMapManager {
	

	public static void CarTo(MapView view, GeoPoint startGeoPoint,
			GeoPoint reachGeoPoint) {

	}

	public static void BusTo(MapView view, GeoPoint startGeoPoint,
			GeoPoint reachGeoPoint) {
		
	}

	public static void WarkTo(MapView view, GeoPoint startGeoPoint,
			GeoPoint reachGeoPoint) {
	
	}


	public static void MoveTo(MapView view, GeoPoint point) {
		// TODO Auto-generated method stub
		
	}


	public static void DrawLine(MapView view, GeoPoint startGeoPoint,
			GeoPoint endGeoPoint) {
		
		DrawMarke(view, startGeoPoint);
		DrawMarke(view, endGeoPoint);
		
		LineOverlay lay = new LineOverlay();
		lay.AddPoint(startGeoPoint);
		lay.AddPoint(endGeoPoint);
		lay.draw(view, true);
		
	}
	
	public static void DrawLine(MapView view, GeoPoint startGeoPoint,
			GeoPoint endGeoPoint,Drawable marker) {		
		DrawMarke(view, startGeoPoint,marker);
		DrawMarke(view, endGeoPoint,marker);
		
		LineOverlay lay = new LineOverlay();
		lay.AddPoint(startGeoPoint);
		lay.AddPoint(endGeoPoint);
		lay.draw(view, true);
	}
	
	public static void DrawMarke(MapView view, GeoPoint drawPoint,
			Drawable marker) {
		marker.setBounds(0, 0, marker.getIntrinsicWidth(),
				marker.getIntrinsicHeight());
		InterestingLocations startLocation = new InterestingLocations(marker, drawPoint);
		view.getOverlays().add(startLocation);
	}
	
	public static void DrawMarke(MapView view ,GeoPoint drawPoint) {
//		
//		Drawable marker = view.getContext().getResources().getDrawable(R.drawable.mapmarder);	
//		marker.setBounds(0, 0, marker.getIntrinsicWidth(),
//				marker.getIntrinsicHeight());
//		InterestingLocations startLocation = new InterestingLocations(marker, drawPoint);
//		view.getOverlays().add(startLocation);
//		Log.i("DrawMaker", drawPoint.toString());
	}
	
}
